// JavaScript Document

/*1/exports导出和require导入*/

// const add = (n1, n2)=> n1+n2;
// exports.add = add;


/*2.module.exports导出和require导入*/
// const greeting = name =>  `hello ${name}`;
// const x=100;
// exports.x=x;
// module.exports.greeting=greeting;


const sayHello = function(name) {
    return `你好呀～${name}--现在是${new Date().toJSON()}`;
};

let color = 'red';
module.exports = {
    sayHello,
    color
};